The present invention relates to an image data processing apparatus and a motion compensation processing method used therefor, and more particularly, to motion compensation processing out of MPEG2 (Moving Picture Experts Group phase 2) decoding processing.
In recent years, as a coding method for storage of a color moving image, standardization work is conducted by means of an MPEG. In the coding method of this MPEG, there are MPEG1, MPEG2 and so forth, and in the MPEG1, a transfer speed is about 1.5 Mbps, and storage media such as a CD-ROM (Compact Disk-Read Only Memory) are mainly objects to which it is applied, and a motion compensation estimation/DCT (Discrete Cosine Transform) method into which periodical intra-frame coding is introduced is used for its coding algorithm.
In the MPEG2, a transfer speed is in a wide range between several Mbps and several ten Mbps, and like the MPEG1, storage media are objects to which the MPEG2 is applied, and in addition thereto, picture transmission and so forth in which next-generation television broad casting and a wide band ISDN (Integrated Service Digital Network) are utilized are also an object, and the MPEG2 has compatibility with the MPEG1.
Here, the motion compensation estimation/DCT method is a method in which an estimated error obtained by motion compensation inter-frame estimation is encoded by using DCT, and in the method, intra-frame coding by means of the DCT is conducted without using the motion compensation inter-frame estimation, when the estimation is difficult at the beginning of a motion image sequence and at a scene change and so forth.
An image compressed by means of the MPEG method is decoded through variable length decoded (VLD) processing, inverse scan processing, inverse quantization (IQ) processing, inverse discrete cosine transform (IDCT) processing and motion compensation (MC) processing.
The decoded data is represented as a set of values indicated by luminance 8 bits and color difference 8 bits per pixel. However, at an end time point of each processing, data length per pixel is not always represented by 8 bits. The data after the inverse discrete cosine transform processing is finished is represented by 9 bits per pixel.
Out of the above-mentioned decoding processing of the MPEG2, since an pixel data is handled by 9 bits per pixel in the motion compensation processing, overflow occurs in an apparatus in which it is assumed that a data is handled by 8 bits, and the data cannot be decoded correctly. Accordingly, such an apparatus is designed so that the image data is divided into two 8-bit data.
However, in such a method, since processing for dividing the data into two 8-bit data and quantity of a data to be transferred to a motion compensating section are increased, quantity of processing necessary for decoding is increased.
Therefore, the objective of the present invention is to solve the above-described tasks.
Also, the objective of the present invention is to provide an image processing apparatus and a motion compensation processing method used therefor, and a recording medium, which are capable of realizing motion compensation processing by means of a more simple apparatus and transferring a data after inverse discrete cosine transform to a motion compensating section at a high speed.
The present invention for accomplishing the above-described objective is an image data processing apparatus in which decoding of a compressed image data is conducted through variable length decoding processing, inverse scan processing, inverse quantization processing, inverse discrete cosine transform processing and motion compensation processing, characterized in that the apparatus has:
a divider for dividing a data after the inverse discrete cosine transform processing is completed into halves; and
a motion compensation processor for repeatedly applying the motion compensation processing to the above-described halved data two times.
Also, the above-described divider for dividing the data into halves is characterized in that it includes a divider for shifting the data after the above-described inverse discrete cosine transform processing, which is represented by 9 bits, to right by 1 bit, and dividing a value thereof into halves.
Also, for an estimated error which is obtained by motion compensation inter-frame estimation, the above-described motion compensation processor is characterized in that it includes an adder for adding a pixel data shifted to right by 1 bit in conducting decoding of an encoded compressed data using the inverse discrete cosine transform processing to a reference data two times, which is used for the above-described motion compensation inter-frame estimation.
The present invention for accomplishing the above-described objective is an image data processing apparatus in which decoding of a compressed image data is conducted through variable length decoding processing, inverse scan processing, inverse quantization processing, inverse discrete cosine transform processing and motion compensation processing, characterized in that the apparatus has:
a divider for shifting a data after inverse discrete cosine transform processing, which is represented by 9 bits, to right by 1 bit, and dividing a value thereof into halves; and
for an estimated error which is obtained by motion compensation inter-frame estimation, a motion compensation processor for adding a pixel data shifted to right by 1 bit in conducting decoding of an encoded compressed data using the inverse discrete cosine transform processing to a reference data two times, which is used for the above-described motion compensation inter-frame estimation.
The present invention for accomplishing the above-described objective is a motion compensation processing method of an image data processing apparatus in which decoding of a compressed image data is conducted through variable length decoding processing, inverse scan processing, inverse quantization processing, inverse discrete cosine transform processing and motion compensation processing, characterized in that the method has steps of:
dividing a data after the inverse discrete cosine transform processing is completed into halves; and
repeatedly applying the motion compensation processing to the above-described halved data two times.
Also, the above-described step of dividing the data into halves is characterized in that it includes a step of shifting the data after the above-described inverse discrete cosine transform processing, which is represented by 9 bits, to right by 1 bit, and dividing a value thereof into halves.
Also, for an estimated error which is obtained by motion compensation inter-frame estimation, the above-described step of applying the motion compensation processing is characterized in that it includes a step of adding a pixel data shifted to right by 1 bit in conducting decoding of an encoded compressed data using the inverse discrete cosine transform processing to a reference data two times, which is used for the above-described motion compensation inter-frame estimation.
The present invention for accomplishing the above-described objective is a recording medium in which a program is stored for making a computer execute decoding processing of a compressed image data through variable length decoding processing, inverse scan processing, inverse quantization processing, inverse discrete cosine transform processing and motion compensation processing, characterized in that the above-described program makes the computer execute steps of:
dividing a data after the inverse discrete cosine transform processing is completed into halves; and
repeatedly applying the motion compensation processing to the above-described halved data two times.
Also, the above-described step of dividing the data into halves is characterized in that it includes a step of shifting the data after the above-described inverse discrete cosine transform processing, which is represented by 9 bits, to right by 1 bit, and dividing a value thereof into halves.
Also, for an estimated error which is obtained by motion compensation inter-frame estimation, the above-described step of applying the motion compensation processing is characterized in that it includes a step of adding a pixel data shifted to right by 1 bit in conducting decoding of an encoded compressed data using the inverse discrete cosine transform processing to a reference data two times, which is used for the above-described motion compensation inter-frame estimation.
In other words, the motion compensation processor in the image data processing apparatus of the present invention provides means for simplifying the motion compensation processing that is one of decoding procedures in decoding a compressed image by means of an MPEG2 method.
More particularly, in the image data processing apparatus of the present invention, an original image stored in a storage device and compressed by means of the MPEG2 method is loaded, and the image data is decoded and is sent to a display.
As mentioned above, the image compressed by means of the MPEG method is decoded through variable length decoded (VLD) processing, inverse scan (I Scan) processing, inverse quantization (IQ) processing, inverse discrete cosine transform (IDCT) processing and motion compensation (MC) processing. The decoded data is represented as a set of values indicated by luminance 8 bits and color difference 8 bits per pixel.
However, at an end time point of each processing, data length per pixel is not always represented by 8 bits. The data after the inverse discrete cosine transform processing is finished is represented by 9 bits per pixel. Accordingly, overflow occurs in an apparatus in which it is assumed that one data is handled by 8 bits, and the data cannot be decoded correctly.
Therefore, by dividing a data after the inverse discrete cosine transform processing, which is represented by 9 bits per pixel, into halves, sending it to the motion compensation processor, and in the motion compensation processor, conducting usual motion compensation processing two times, a problem due to the overflow is avoided.
In other words, in the image data processing apparatus of the present invention, the image data represented by 9 bits is shifted to right by 1 bit, and its value is divided in two and it is transferred to the motion compensation processor, and motion compensation processing is repeatedly conducted two times in the motion compensation processor, and thereby, quantity of transfer processing is reduced by half. Also, it is possible to reduce quantity of a buffer by half compared with a conventional method in which two buffers of 8 bits per pixel are used.